/*
* Poppy Game Engine - https://pgetemplate.googlecode.com/svn/
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* Copyright (c) 2008 Poppy
*/

inline void CBinaryStream::Seek(int pos, PGE_WHENCE whence)
{
	switch(whence)
	{
	case PGE_SEEK_SET:
		m_dFilePointer = pos;
		break;
	case PGE_SEEK_CUR:
		m_dFilePointer += pos;
		break;
	case PGE_SEEK_END:
		int length = GetLength();
		m_dFilePointer = length-pos;
		break;
	}
}

inline int  CBinaryStream::GetPosition()
{
	return m_dFilePointer;
}
